The present invention is directed to an apparatus and method for storing track layout information for performing update write operations. In particular, the present invention is directed to an apparatus and method for storing track layout information based on disk cylinders which is then used to verify a quick write operation.
Use of Direct Access Storage Devices (DASDs) in a data processing system requires performance of certain Input/Output (I/O) functions. Data must be transferred between the DASD and the host processor. Such DASDs are often connected to a host processor through an I/O channel. The host Central Processing Unit (CPU) operating system initiates data transfer with a command to the I/O channel. This shifts control to a series of Channel Command Words (CCWs) that are sent from the CPU over the channel to the DASD controller for effectuating data movement across the interface.
The channel forwards each CCW to the controller for a selected DASD. Once the channel passes a command to a particular controller, the command must be interpreted and the elements of the command must be executed by the DASD. The various functions of channel, controller and command interpretation can be integrated with the host processor or distributed between the host and the mechanical storage components of the DASD.
The DASD controller performs several functions, including the interpretation and execution of CCWs forwarded by a channel from the host CPU. Seek commands position a DASD access mechanism. Search commands cause comparison between data from main CPU storage and data stored on specified DASD areas. Read commands cause data copies to be transferred from DASD storage to main CPU storage and checked for validity.
Another important function of the DASD controller is the prescription of data storage format for the DASD. Such a format includes provisions for certain xe2x80x9cnon-dataxe2x80x9d information such as the track address, record address, and so forth. There are also unused spaces and error correction codes prescribed for the DASDs commonly encountered in widespread use.
Conventional track formats include an index point on each track of the recording surface indicating the physical beginning of the track. Also, on each track, there is normally one Home Address (HA) that defines the physical location of the track and the condition of the track. The HA normally contains the physical track address, a track condition flag, a cylinder number (CC) and a head number (HH). The combination of the cylinder number and head number indicates the track address and is commonly expressed in the form CCHH. The HA contains the xe2x80x9cphysicalxe2x80x9d track address, which is distinguished from a xe2x80x9clogicalxe2x80x9d track address. The physical and logical track addresses may differ for records stored in the DASD tracks.
The first record following the HA is commonly a track descriptor record, sometimes referred to as R0. One or more user data records follow R0 on the track. The first part of each user record is an xe2x80x9caddress markerxe2x80x9d that enables the controller to locate the beginning of the record when reading data from DASD. Each user record is commonly formatted in either a xe2x80x9ccount-dataxe2x80x9d (CD) or a xe2x80x9ccount-key-dataxe2x80x9d (CKD) format. The only difference between the CD and CKD formats is the presence of key fields and key length data in the CKD formatted record. Both are herein henceforth referred to as CKD records.
The CKD record consists of a count field, an optional key field and a variable-length data field. The typical count field is of the form CC (two bytes of cylinder number), HH (two bytes of head number), R (one byte of record number), KL (one byte of key length), and DL (two bytes of data length). Thus, each CKD record is self-identifying. The CCHH in the count field (called xe2x80x9clogicalxe2x80x9d CCHH) is typically the same as the cylinder and head numbers in the HA for the track containing the record (called xe2x80x9cphysicalxe2x80x9d CCHH), although not necessarily. Thus, a CKD track consists of the track header (HA and R0) followed by some number of CKD records. The CKD record numbers (R) may, but need not, increment along the track in a monotonic pattern of one, two, three, and so on.
In the typical situation, user data is written or read in a data field of a CKD record in some track on some DASD. The channel specifies the device and the track within the device of interest. The channel may also specify the rotational position on the track from which to begin searching for the record having the data field to be read or written. This is accomplished by specifying a search parameter (five bytes in the form CCHHR) for use by the DASD controller to match against count fields in the track of interest. When the DASD controller finds a CKD record on the track with a count field that matches the search parameter, it then either reads or writes the corresponding data field.
The fundamental feature of importance to this invention is that the disk controller is not permitted to read or write until it has verified the existence of a count field in the track that matches the channel search parameter. This means that a write command will force the channel to wait until the matching record is actually located on the rotating DASD medium. Of course, such a read wait state is reasonable because a CKD record cannot be read until located, but the only overriding reason for holding the CPU channel merely to locate the proper record for updating is to ensure error recovery.
The prior art is replete with methods for reducing and eliminating the host CPU wait states necessitated by DASD accesses for read and write. A DASD cache is a high-speed buffer store used to hold portions of the DASD address space contents in a manner that reduces channel wait states. U.S. Pat. No. 4,603,380 discloses a method for DASD cache management that reduces the volume of database transfers between DASD and cache, while avoiding the complexity of managing variable length records in the cache. This is achieved by forcing the starting point for staging a record to the beginning of the missing record and, at the same time, allocating and managing cache space in fixed length blocks.
Some DASD controllers such as the IBM 3990 DASD controller, have some amount of relatively fast Non-Volatile Store (NVS) for storing records that have been written by the host system but not yet written to the DASD medium by the DASD controller. The NVS is additional to the high speed cache buffer store commonly included in the typical disk controller. DASD controllers having both cache and NVS are said to perform xe2x80x9cfast-writexe2x80x9d operations.
A fast-write operation proceeds as follows, if a track record to be updated is already in cache (that is, a record count field is found in cache that matches the search parameters provided by the host computer), the cache copy of the record is updated in cache and another updated copy is made in NVS. The two copies of modified records are maintained for error recovery purposes to avoid single points of failure. After copying to NVS, the DASD controller returns a completion signal to the host system, freeing the host CPU to proceed with the next channel operation. Such an operation is called a xe2x80x9cfast-write hitxe2x80x9d and is completed well before the updated record is actually written to the DASD. At some later time, the DASD controller asynchronously de-stages the updated record to disk from the cache and then removes the record from NVS and optionally cache as well.
This explanation, made in terms of a single record, actually is better understood in terms of a single track. DASD controller cache memory is generally organized in fixed block sizes. Because a single track is often a fixed size while single records are not, the typical practice is to stage and de-stage data from cache to DASD and back again in single track increments.
With a xe2x80x9cfast-write hitxe2x80x9d, the DASD controller can eliminate the disk access time from the channel write operation as perceived by the host CPU. The actual de-stage of the modified record from cache to disk can be accomplished at a more convenient time; for example, when the DASD controller is idle, or when there is other work to be done against the same track or cylinder as the one holding the modified record.
If the record to be updated was not originally located in cache, however, the xe2x80x9cfast-writexe2x80x9d operation becomes a xe2x80x9cfast-write missxe2x80x9d and the DASD controller must then locate the record on a disk before releasing the channel. That is, a fast-write miss is treated as if there is no cache after the disk controller locates the track. It must search the count fields or records in the track starting at any specified rotational position, and search for a matching count field. Once the matching count field is located, the DASD controller updates the corresponding data field on the DASD and, only then, returns a completion signal to the host CPU. With other systems, the track may first be staged and an update write operation is performed as if it were a fast write-hit operation. The controller may also read the entire track into cache at the same time in anticipation of subsequent updates to records on the same track.
It will be appreciated that a xe2x80x9cfast-write missxe2x80x9d is much slower than a xe2x80x9cfast-write hitxe2x80x9d because it includes a disk access delay as part of the response time seen by the host CPU. Thus, the controller functions as slowly on a fast-write miss as it does without the fast-write capability. Thus, for applications exhibiting poor write-hit ratios, use of DASD controllers with fast-write capability will not materially improve DASD channel efficiency.
One solution to this problem is to keep information about each track in processor and/or cache memory. For example, European Patent Application EP 0 550 154 A1, entitled xe2x80x9cMethod of Updating Records,xe2x80x9d provides a track table that can be utilized to locate a track on a Direct Access Storage Device (DASD). The track table is indexed by track. Thus, the track table according to EP 0 550 154 A1 at a minimum stores for each track the cylinder and head number for each track""s record header, and the record length for each record on that track.
As the number of disks in DASD systems increase, the amount of storage space just to store the track table becomes problematic. For example, a system comprised of 1024 devices, each device having 50,085 tracks, requires a minimum of 196 MB of memory space to store the track table. If the number of devices increases four times to 4096, the minimum amount of require memory space rises to 784 MB. In addition, the amount of processing time necessary to search the table for a track listing increases.
Thus, it would be advantageous to have an apparatus and method for storing track information, for use in validating an update write operation, in which the amount of memory space required for the track information is a minimum.
The present invention provides an apparatus and method for storing track layout information for performing update write operations. In particular, the present invention provides an apparatus and method for storing track layout information based on cylinders which is then used to verify a quick write operation.
With the present invention, as tracks are written to or read from a storage device, such as a DASD, or written to a Non-Volatile Store (NVS), a cylinder table is populated with information identifying the tracks that meet criteria set for identifying tracks that are candidates for future quick write operations. The criteria are set to identify those tracks that have a layout that is predictable.
The term xe2x80x9cquick writexe2x80x9d operation is intended to mean an update write operation in which track data need not be read from the physical storage device before performing an update of one or more records in the track. A track or record may be a candidate for a quick write operation and may not be a candidate for a fast write operation because the track is not already in cache but need not be read from the physical storage device.
At some time later, if the same track is the subject of an update write operation, it is determined whether the update write track has the same layout as that identified in the cylinder table. If so, the quick write operation is enabled. If not, a quick write operation is not enabled and the track must be staged.
The track layout information is stored on a cylinder basis. Thus, the amount of information that must be maintained in the cylinder table to identify tracks that are candidates for future quick write operations is reduced. As a result, the amount of computing time necessary to perform a track update write validation for determining if an update write operation should be allowed, is reduced since the amount of information searched is reduced.